<div class="nav-tabs-custom">
	<ul class="nav nav-tabs">
        <li><a href="{:Url('index')}">图片位置管理</a></li>
		<li class="active"><a href="#">图片列表</a></li>
		<li class=""><a href="{:Url('picAdd', array('picid'=>$pic['id']))}">添加图片</a></li>
	</ul>
	
    <div class="box-body">
		<form class="js-ajax-form" action="{:Url('picSort')}" method="post">
			<div class="table-actions">
				<button class="btn btn-primary btn-ss btn-flat js-ajax-submit" type="submit">排序</button>
			</div>
            <table class="table table-hover table-bordered" id="menus-table">
                <thead>
                    <tr>
                        <th width="80">排序</th>
                        <th width="50">ID</th>
                        <th>图片标题</th>
                        <th>所属位置</th>
                        <th>图片</th>
                        <th width="80">状态</th>
                        <th width="140">添加时间</th>
                        <th width="80">操作</th>
                    </tr>
                </thead>
                <tbody>
                    {volist name="list" id="vo"}
                    <tr>
                        <td>
							<input name='sort[{$vo.id}]' type='number' min='0' value='{$vo.sort}' class='form-control input-sm input-ss display_de width50' />
						</td>
                        <td>{$vo.id}</td>
                        <td>{$vo.name}</td>
                        <td>{$pic.name} {$pic.picwidth}x{$pic.picheight}</td>
                        <td>
                            <?php if(!empty($vo['imgurl'])): ?>
                            <img src="<?php echo $vo['imgurl'];?>" style="max-height:30px; max-width:100px;">
                            <?php endif; ?>
                        </td>
                        <td>{$vo.status_text}</td>
                        <td>{$vo.create_time}</td>
                        <td>
                            <div class="visible-md visible-lg hidden-sm hidden-xs">
                                <a href="{:Url('picEdit',array('picid'=>$pic['id'], 'id'=>$vo['id']))}" class="btn btn-xs btn-primary btn-flat" data-toggle="tooltip" data-placement="top" title="编辑图片"><i class="fa fa-edit"></i></a>
                                <a href="{:Url('picDel',array('id'=>$vo['id']))}" class="btn btn-xs btn-danger btn-flat js-ajax-del" data-toggle="tooltip" data-placement="top" title="删除图片"><i class="fa fa-trash-o"></i></a>
                            </div>
                        </td>
                    </tr>
                    {/volist}
                </tbody>
            </table>
            {$list->render()}
            <div class="table-actions">
				<button class="btn btn-primary btn-ss btn-flat js-ajax-submit" type="submit">排序</button>
			</div>
		</form>
	</div>
    
</div>